﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using OptikinetiqControls;
using WeifenLuo.WinFormsUI.Docking;

namespace OptiKinetiq_Platform.ContentDisplay
{

    public partial class FlowDIsplay : DockContent
    {

        public List<Display> displayList = new List<Display>();

        public FlowDIsplay()
        {
            InitializeComponent();
        }

        public void AddDisplay(Bitmap bitmap, string info)
        {
            Display display = new Display(bitmap, info);
            display.selectEvent += SelectDisplay;
            stackPanel.Controls.Add(display);
            displayList.Add(display);
        }

        public void ClearDisplay()
        {
            stackPanel.Controls.Clear();
            displayList.Clear();
        }

        public void SelectDisplay(Display sender) {
            MainForm.GetInstance().ShowDisplayImage(sender);
        }
    }
}
